package com.thornbird.vehiclerecycling.service;

import com.thornbird.vehiclerecycling.entity.Order;
import com.thornbird.vehiclerecycling.exception.ForbiddenException;
import com.thornbird.vehiclerecycling.exception.NotFoundException;
import com.thornbird.vehiclerecycling.exception.ValidationException;
import com.thornbird.vehiclerecycling.model.record.OrderRecord;
import com.thornbird.vehiclerecycling.model.record.PageList;
import com.thornbird.vehiclerecycling.model.record.UserRecord;

import java.util.Date;

public interface OrderService {

    PageList<OrderRecord> findOrders(String keyword, Date startDate, Date endDate, Integer pageNumber, Integer pageSize);

    OrderRecord findOrder(Long id) throws NotFoundException;

    OrderRecord saveOrder(Order order, Boolean generateCheckCode, UserRecord userRecord)
            throws NotFoundException, ValidationException, ForbiddenException;

    OrderRecord deleteOrder(Long id, UserRecord userRecord)
            throws NotFoundException, ValidationException, ForbiddenException;

    String getCheckUrl();

    void updateCheckUrl(OrderRecord orderRecord);

}
